/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.warehousekpi.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.warehousekpi.entity.WarehouseKpiReport;
import com.thinkgem.jeesite.modules.warehousekpi.dao.WarehouseKpiReportDao;

/**
 * 工时计算Service
 * 
 * @author hui.li
 * @version 2017-03-16
 */
@Service
@Transactional(readOnly = true)
public class WarehouseKpiReportService extends
		CrudService<WarehouseKpiReportDao, WarehouseKpiReport> {
	@Autowired
	private WarehouseKpiReportDao dao;
	
	public WarehouseKpiReport get(String id) {
		return super.get(id);
	}

	public List<WarehouseKpiReport> queryList() {
		return dao.queryList();
	}
	
	public List<WarehouseKpiReport> findList(
			WarehouseKpiReport warehouseKpiReport) {
		return super.findList(warehouseKpiReport);
	}

	public Page<WarehouseKpiReport> findPage(Page<WarehouseKpiReport> page,
			WarehouseKpiReport warehouseKpiReport) {
		return super.findPage(page, warehouseKpiReport);
	}

	@Transactional(readOnly = false)
	public void save(WarehouseKpiReport warehouseKpiReport) {
		super.save(warehouseKpiReport);
	}

	
	/**
	 * 批量提交数据
	 * 
	 * @param list
	 */
	@Transactional(readOnly = false)
	public void batchInsert(List<WarehouseKpiReport> list) {
		super.batchInsert(list);
	}
	
	/**
	 * 批量提交数据
	 * 
	 * @param list
	 */
	@Transactional(readOnly = false)
	public void batchupdate(List<WarehouseKpiReport> list) {
		super.batchupdate(list);
	}

	@Transactional(readOnly = false)
	public void delete(WarehouseKpiReport warehouseKpiReport) {
		super.delete(warehouseKpiReport);
	}

	/**
	 * 根据工时，税率，计算费用
	 * @param page
	 * @param warehouseKpiReport
	 * @return
	 */
	public Page<WarehouseKpiReport> findCostList(Page<WarehouseKpiReport> page,
			WarehouseKpiReport warehouseKpiReport) {
		warehouseKpiReport.setPage(page);
		page.setList(dao.findCostList(warehouseKpiReport));
		return page;
	}
	/**
	 * 根据工时，税率，计算费用
	 * @param page
	 * @param warehouseKpiReport
	 * @return
	 */
	public WarehouseKpiReport findCostSummaryList(
			WarehouseKpiReport warehouseKpiReport) {
		return dao.findCostSummaryList(warehouseKpiReport);
	}
}